using System.Threading.Tasks;
using DG.Tweening;
using UnityEngine;

public class TransitionLock : MonoBehaviour
{
	public Transform LeftGate;

	public Transform RightGate;

	public GameObject UnlockEffect;

	public GameObject UnlockVisual;

	private void Start()
	{
	}

	private void Update()
	{
		if (Input.GetKeyDown(KeyCode.U))
		{
			Unlock();
		}
	}

	public async void Unlock()
	{
		UnlockEffect.transform.DOScale(new Vector3(2f, 2f, 2f), 1.5f);
		await Task.Delay(1500);
		LeftGate.DORotate(new Vector3(-90f, 0f, 0f), 0.25f);
		RightGate.DORotate(new Vector3(90f, 0f, 0f), 0.25f);
		UnlockVisual.SetActive(value: false);
		UnlockEffect.SetActive(value: true);
	}
}
